This invention relates to electrical telecommunication and more particularly to packet networks using the Internet Protocol and even more particularly to minimizing delays in packet delivery in such networks.
Applications sending real-time data streams over unreliable Internet Protocol (IP) networks have a lot of problems to overcome, including long and variable delays and lost and out-of-sequence packets. Today, these problems can be reduced by using techniques such as the Real Time Protocol (RTP) and jitter buffers.
The RTP is a real-time transport protocol that provides end-to-end network transport functions suitable for applications transmitting real-time data, such as audio, video, or simulation data, over multicast or unicast network services. The RTP does not address resource reservation and does not guarantee quality-of-service for real-time services. The RTP provides for sequence numbering, which tells the receiving node if the packets are arriving in sequence or at all. The data transport is augmented by a control protocol (RTCP) to allow monitoring of the data delivery in a manner scalable to large multicast networks, and to provide minimal control and identification functionality. The RTP and RTCP are designed to be independent of the underlying transport and network layers. The RTP is specified in H. Schulzrinne et al., Request for Comments 1889 xe2x80x9cRTP: A Transport Protocol for Real-Time Applicationsxe2x80x9d, (Feb. 1, 1996).
Jitter buffers are memories in receiving nodes that are used for sorting the packets into the correct sequence, and delaying the packets as needed to compensate for variations in network delay. The RTP specification discusses such interarrival jitter in Section 6.3.1 and Appendix A.8 that provide for forming a 32-bit estimate of the statistical variance of the RTP data packet interarrival time, measured in timestamp units and expressed as an unsigned integer. The interarrival jitter J is defined to be the mean deviation (smoothed absolute value) of the difference D in packet spacing at the receiver compared to the sender for a pair of packets. As shown in the equation below, this is equivalent to the difference in the xe2x80x9crelative transit timexe2x80x9d for the two packets; the relative transit time is the difference between a packet""s RTP timestamp and the receiver""s clock at the time of arrival, measured in the same units. If Si is the RTP timestamp from packet i, and Ri is the time of arrival in RTP timestamp units for packet i, then for two packets i and j, D may be expressed as:
D(i,j)=(Rjxe2x88x92Ri)xe2x88x92(Sjxe2x88x92Si)=(Rjxe2x88x92Sj)xe2x88x92(Rixe2x88x92Si)
The interarrival jitter is calculated continuously as each data packet i is received from the source, using this difference D for that packet and the previous packet ixe2x88x921 in order of arrival (not necessarily in sequence), according to the formula:
J=J+(|D(ixe2x88x921, i)|xe2x88x92J)/16
This algorithm is the optimal first-order estimator and the gain parameter {fraction (1/16)} gives a good noise reduction ratio while maintaining a reasonable rate of convergence.
The problem today is determining the delay time needed in the jitter buffer to achieve a smooth data feed to the application, without excessive delays. This problem can seriously affect voice communication using the Internet/intranet as the backbone for transmitting the speech. In addition, the need for smarter use of network bandwidth will become more and more important as the number of users of IP telephony increases.
In the communications between a mobile cellular telephone and a radio base station, it is common to employ a technique called discontinuous transmission (DTX) mainly to save battery power in the mobile. Briefly stated, DTX means that a transmitter does not send any data if it does not have any new data to send. When a mobile station detects that the user is not speaking, the mobile station sends only Silence Descriptor (SID) frames that contain background noise. The SID frames are sent periodically, generally about every 480 milliseconds, and between the SID frames the mobile station sends nothing.
The idea of using DTX to save bandwidth has been brought up in the IMTC Voice over IP Forum Technical Committee (V61P1A 1.0), but no implementations have yet been discussed. There are also some special cases that need to be handled when using DTX over an IP network.
Applicants"" invention solves the problem of determining the delay time needed in a jitter buffer and achieves the object of obtaining a smooth data feed to an application, without excessive delays. Thus, Applicants"" invention improves voice communication using the Internet/Intranet as the backbone for transmitting the speech and uses network bandwidth more intelligently.
In one aspect of the invention, there is provided a receiving node in a packet communication system that includes a jitter buffer that has a variable size, that stores packets arriving at the receiving node, and that releases stored packets to an application executing in the receiving node, wherein each packet has a respective sequence number, stored packets are released periodically, and each entry in the jitter buffer has one of a plurality of states; and a processor that varies the size of the jitter buffer based on an estimated variation of packet transmission delay derived from the times of arrival of stored packets.
The receiving node may further include a variance buffer that stores variances of the times of arrival of stored packets, and the time that the first-arrived packet is released is based on the time of arrival of the first packet and the initial delay, and the estimated variation of packet transmission delay is derived from the stored variances.
The states of the jitter buffer entries may be free, busy, and used, the free state indicating that no arrived packet is stored at that location in the jitter buffer, the busy state indicating that an arrived packet is stored at that location in the jitter buffer, and the used state indicating that an arrived packet stored at that location is being released to the application. Arrived packets may then be stored in respective locations that are marked in the busy state; packets may be released in response to queries by the application; and when the application queries the jitter buffer for a next packet, that packet""s respective location may be changed to the used state and the respective location of the previously arrived packet may be changed to the free state.
The processor may decrease the size of the jitter buffer while the receiving node is in a discontinuous transmission mode, thereby avoiding discarding arrived packets that hold speech information. The receiving node may then include a DTX buffer that stores selected packets arriving at the receiving node. An arriving packet is selected based on at least one of whether the arriving packet is first to arrive after a speech period and holds total noise information and whether the arriving packet contains noise-update information, arrives after a speech period, and has a respective sequence number that is subsequent to the sequence number of an earlier arriving packet holding speech information. The processor then changes the size of the jitter buffer while packets are being selected, thereby avoiding discarding packets holding speech information.
In another aspect of the invention, there is provided a method of storing in a buffer packets arriving at a receiving node in a packet communication system and releasing arrived packets to an application executing in the receiving node. The method includes the steps of determining a time Tr to release a first arrived packet to the application, the time Tr being the first packet""s arrival time Ta plus an initial delay, while waiting for the first arrived packet to be released from the buffer, comparing a current time to the time Tr and releasing the first arrived packet when the time Tr has passed, and after the first arrived packet is released, releasing stored packets periodically at first intervals.
The comparing may be performed in response to queries from the application that occur periodically at second intervals, stored packets arrived after the first arrived packet may be released in response to queries from the application that occur periodically at the first intervals, and the first interval may be at least as long as the second interval. Also, the first interval may be substantially equal to transmission intervals between arriving packets.
In a further aspect of the invention, there is provided a method of adapting a size of a buffer that stores packets arriving at a receiving node in a packet communication system. The method includes the steps of: counting a number of arrived packets having sequence numbers lower than that of an oldest arrived packet stored in the buffer; comparing the number to an accepted loss parameter; if the number is greater than the accepted loss parameter, increasing a change indicator counter and if the number is equal to or less than the accepted loss parameter, decreasing the change indicator counter; increasing the size of the buffer when the change indicator counter reaches an indicator roof parameter if the buffer is not already at its largest permitted size; and decreasing the size of the buffer when the change indicator counter reaches an indicator floor parameter if the buffer is not already at its smallest permitted size.
The step of determining the size of the buffer may be performed by determining an expected arrival time of a packet in relation to an arrival time of a first packet of a packet sequence; determining an arrival time variance for the packet; determining a measured delay that is a time the packet will be delayed in the buffer; determining a desired delay based on the arrival time variance and the accepted loss parameter; and determining the size of the buffer based on the desired delay and the measured delay.
The arrival time variances may be stored in a variance buffer and sorted and normalized. Also, measured delays may be accumulated for packets having arrival time variances stored in the variance buffer, and the desired delay may be determined based on the sorted, normalized arrival time variances and the accepted loss parameter. The size of the buffer is then determined based on the desired delay and an average measured delay derived from the accumulated measured delays.
The size of the buffer may be decreased while the receiving node is in a discontinuous transmission mode, thereby avoiding discarding arrived packets that hold speech information. The method may then include the step of storing in a DTX buffer selected packets arriving at the receiving node. An arriving packet is selected based on at least one of whether the arriving packet is first to arrive after a speech period and holds total noise information and whether the arriving packet contains noise-update information, arrives after a speech period, and has a respective sequence number that is subsequent to the sequence number of an earlier arriving packet holding speech information. The size of the buffer is then changed while packets are being selected, thereby avoiding discarding packets holding speech information.